using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class BlanderBelieve : CardItem
{

    protected override void Start()
    {
        base.Start();
        if (FightManager.Instance.isBelieved)
        {
            RoleManager.Instance.character.GetHurt(5);
            FightManager.Instance.isBelieved = false;
        }
    }

    public override void OnEndDrag(PointerEventData eventData)
    {
        if (TryUse() == true)
        {
            DealCardUse();

        }
        else
        {
            base.OnEndDrag(eventData);
        }
    }
    protected override void DealCardUse()
    {
        foreach (CardItem card in UIManager.Instance.GetUI<BattleUI>("BattleUI").GetCardList())
        {
            card.CostChange(-2);
        }

        FightManager.Instance.isBelieved = true;
    }
}
